/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.PokemonEJB;

import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Branislav Paulis
 */
@Local
public interface TrainerServiceLocal {
    /**
     * Adds trainer into the database.
     * 
     * @param trainer trainer to be added
     */
    Trainer addTrainer(Trainer trainer);

    /**
     * Extract trainer from database according its id.
     * 
     * @param id is id of trainer which we want get from the database
     * @return trainer acoording id, null while id can not be found
     */
    Trainer getTrainer(Long id);
    
    /**
     * Updates trainer in the database.
     * 
     * @param trainer trainer to be updated
     */
    Trainer updateTrainer(Trainer trainer);
    
    /**
     * Removes trainer from the database.
     * 
     * @param trainer trainer to be removed
     */
    Trainer removeTrainer(Trainer trainer);
    
    /**
     * Method finds all trainers in database and returns them
     * If there are no trainers in the database, method returns empty list.
     * 
     * @return list of all trainers in the database
     */
    List<Trainer> getAllTrainers();
    
    void setTrainerDAO(TrainerDAOLocal trainerDAO);
}